num1 = float(input("请输入第一个数字："))
num2 = float(input("请输入第二个数字："))

operator = input("请选择运算符(+、-、*、/):")

result = 0

if operator == "+":
    result = num1 + num2
    print(f"运算结果：{result:.2f}")
elif operator == "-":
    result = num1 - num2
    print(f"运算结果：{result:.2f}")
elif operator == "*":
    result = num1 * num2
    print(f"运算结果：{result:.2f}")
elif operator == "/":
    if num2 == 0:
        print("除数不能为0")
    else:
        result = num1 / num2
        print(f"运算结果：{result:.2f}")
else:
    print("无效的运算符")
